package e2q.liferay.domain;

import javax.persistence.Column;
// default package
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;



/**
 * E2qLiUsersGroupsId entity. @author MyEclipse Persistence Tools
 */

public class E2qLiUsersGroupsId  implements java.io.Serializable {


    // Fields    

     private E2qLiUser user;
     private E2qLiGroup group;


    // Constructors

    /** default constructor */
    public E2qLiUsersGroupsId() {
    }

    
    /** full constructor */
    public E2qLiUsersGroupsId(E2qLiUser user, E2qLiGroup group) {
        this.user = user;
        this.group = group;
    }

   
    // Property accessors
	@ManyToOne
	@JoinColumn(name = "userId")
    public E2qLiUser getUser() {
        return this.user;
    }
    
    public void setUser(E2qLiUser user) {
        this.user = user;
    }
	@ManyToOne
	@JoinColumn(name = "groupId")
    public E2qLiGroup getGroup() {
        return this.group;
    }
    
    public void setGroup(E2qLiGroup group) {
        this.group = group;
    }
   


    @Override
   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof E2qLiUsersGroupsId) ) return false;
		 E2qLiUsersGroupsId castOther = ( E2qLiUsersGroupsId ) other; 
         
		 return (this.user.getUserId()==castOther.user.getUserId())
 && (this.group.getGroupId()==castOther.group.getGroupId());
   }
    @Override
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + this.user.getUserId().intValue();
         result = 37 * result + this.group.getGroupId().intValue();
         return result;
   }   





}